/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package main;

import algorithms.L1Metric;
import algorithms.MDL;
import algorithms.MutualEntropy;
import java.io.Console;
import java.io.File;
import java.io.IOException;
import utilities.StringParse;
import utilities.TextFile;
import utilities.Tree;
import utilities.WriteL1Metric;
import utilities.WriteMutualEntropy;

/**
 *
 * @author Gary Furlong
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException, InterruptedException {

        int test = Integer.parseInt("6");
        System.out.println(test);

        System.out.println("Welcome to BayesianNetworks Analyser\n-------------------------------------\n\n");
        System.out.print("Enter the name of the file to analyse: ");
        String strInput = "";
        while (true) {
            try {
                int tmp = System.in.read();
                if (tmp == '\n') {
                    break;
                }
                char c = (char) tmp;
                strInput = strInput + c;
            } catch (IOException e) {
            }
        }
        System.out.println("");
        File testFile = new File(strInput);
        StringParse.intoStruct(TextFile.getContents(testFile));
        WriteL1Metric.Write(strInput);
        WriteMutualEntropy.Write(strInput);
        Tree.set();
        MDL.richardsAttempt();
    }

}
